package cn.heycm.blog.console.infra.convert;

import cn.heycm.blog.api.console.login.vo.SessionVO;
import cn.heycm.blog.api.console.paramcfg.command.SaveCfgCmd;
import cn.heycm.blog.api.console.paramcfg.vo.CfgVO;
import cn.heycm.blog.common.entity.session.Session;
import cn.heycm.blog.console.infra.dao.paramcfg.entity.ParamCfg;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * MapStruct
 *
 * @author hey
 * @version 1.0
 * @since 2024/9/17 20:27
 */
@Mapper
public interface ConsoleConvert {

    ConsoleConvert INST = Mappers.getMapper(ConsoleConvert.class);

    SessionVO toVO(Session session);

    ParamCfg toEntity(SaveCfgCmd cmd);

    CfgVO toVO(ParamCfg cfg);
}
